<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ModifyColumnContentTypeInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table('message')
            ->changeColumn('content_type', 'enum', ['values' => 'common_dot,common_popover,common_modal,text,notice,file,audio,image,card_message,system_hint,link,reply,rich_text,urge,forward,card_message_v2', 'default' => 'text', 'comment' => '消息类型'])
            ->save();
    }

    public function down()
    {
        $this->table('message')
            ->changeColumn('content_type', 'enum', ['values' => 'text,notice,file,audio,image,card_message,system_hint,link,reply,rich_text,urge,forward,card_message_v2', 'default' => 'text', 'comment' => '消息类型'])
            ->save();
    }
}
